package com.lu.banklogin.controller;




import com.lu.banklogin.pojo.dto.LoginDTO;
import com.lu.banklogin.pojo.entity.User;
import com.lu.banklogin.service.UserService;
import com.lu.banklogin.utils.ResultUtil;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * (User)表控制层
 *
 * @author makejava
 * @since 2024-10-22 10:20:12
 */
@RestController
@RequestMapping("user")
public class UserController {
    /**
     * 服务对象
     */
    @Resource
    private UserService userService;


    @PostMapping("/login")
    public ResultUtil login(@RequestBody LoginDTO dto){
        return userService.login(dto);
    }



    @GetMapping("/verify")
    public Boolean loginVerify(String token){
        return userService.verify(token);
    }


    @GetMapping("/verify2")
    public User getUser(String token){
        return userService.verify2(token);
    }






}

